package crossrun.tool.pdf2img.ui.main;

import androidx.arch.core.util.Function;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.Transformations;
import androidx.lifecycle.ViewModel;

import java.io.File;

import crossrun.tool.pdf2img.control.DirListLiveData;

public class PageViewModel extends ViewModel {

    private MutableLiveData<String> mIndex = new MutableLiveData<>();
    private DirListLiveData mText = new DirListLiveData() ;

    public void setIndex(String index) {
        mIndex.setValue(index);
        mText.getFileList(index);
    }

    public LiveData<File[]> getText() {
        return mText;
    }
}